package com.lantosec.hmrp.modules.warning.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.warning.entity.WarningNotifierDept;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 预警部门通知人 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="WarningNotifierDept对象", description="预警部门通知人")
public class WarningNotifierDeptVO extends BaseVO<WarningNotifierDept> {
    private static final long serialVersionUID = 1L;


    public WarningNotifierDeptVO(WarningNotifierDept entity){
        this.ruleId = entity.getRuleId();
        this.dataDeptId = entity.getDataDeptId();
        this.thresholdValue = entity.getThresholdValue();
        this.notifierDeptId = entity.getNotifierDeptId();
        this.notifierPositionId = entity.getNotifierPositionId();
        this.smsTemplateId = entity.getSmsTemplateId();
        this.messageTemplate = entity.getMessageTemplate();
        this.flag = entity.getFlag();
        this.thresholdRemark = entity.getThresholdRemark();
    }

    @Override
    public WarningNotifierDept convertToEntity(){
        return new WarningNotifierDept(this);
    }


    @ApiModelProperty(value = "预警规则ID")
    private String ruleId;

    @ApiModelProperty(value = "数据部门ID")
    private String dataDeptId;

    @ApiModelProperty(value = "阀值列表,分隔")
    private String thresholdValue;

    @ApiModelProperty(value = "预警通知人部门ID")
    private String notifierDeptId;

    @ApiModelProperty(value = "预警通知人岗位ID")
    private String notifierPositionId;

    @ApiModelProperty(value = "短信通知模板ID")
    private Integer smsTemplateId;

    @ApiModelProperty(value = "信息模板内容")
    private String messageTemplate;

    @ApiModelProperty(value = "阀值说明")
    private String thresholdRemark;

    @TableField(exist = false)
    private Integer flag;

}
